home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 34 / Mac Magazin and MacEasy Magazine CD - Issue 34.iso / Grafik & Text / Alpha ƒ / Tcl / SystemCode / AlphaBits.tcl next >
Text File  |  1997-03-27  |  2KB  |  109 lines

  1. if {[file exists "$HOME:Tcl:SystemCode:calc.tcl"]} {
  2.     set alphaLite 0
  3. } else {
  4.     set alphaLite 1
  5. }
  6.  
  7. # if {[string match {*b[0-9]*} [version]] && ![file exists "Powerpete:C"]} {
  8. #     alertnote "This is a BETA version of Alpha. Do NOT redistribute!"
  9. # }
  10.  
  11.  
  12. #if {[regexp {[]\(\)\"\{\}\[]} $HOME]} {alertnote "Alpha may not work properly if it's pathname includes parenthesis, square brackets, double quotes, or curly braces."}
  13. # Get name Alpha's current name.
  14. foreach p [processes] {
  15.     if {[lindex $p 1] == "ALFA"} {
  16.         set ALPHA [lindex $p 0]
  17.         break
  18.     }
  19. }
  20.  
  21.  
  22. # Icon menu names. The number refers to the resource id of the #ics family.
  23. set winMenu         "•263"
  24.  
  25. set globalMenus_curr    {filesetMenu icMenu mailMenu}
  26.  
  27.  
  28. # A few definitions I'll need later.
  29. proc quoteExpr str {
  30.     regsub -all {[][\|*+()]} $str {\\&} str
  31.     return $str
  32. }
  33.  
  34. proc quoteExpr2 str {
  35.     regsub -all {[][\$^|*+()\{\}]} $str {\\&} str
  36.     return $str
  37. }
  38.  
  39. #===============================================================================
  40.  
  41. set auto_path [list $HOME:Tcl:SystemCode $HOME:Tcl:UserCode $HOME:Tcl:Modes $HOME:Tcl:Menus]
  42.  
  43.  
  44. source "$HOME:Tcl:SystemCode:library.tcl"
  45.  
  46. source "$HOME:Tcl:SystemCode:menus.tcl"
  47. source "$HOME:Tcl:SystemCode:keyBindings.tcl"
  48. source "$HOME:Tcl:SystemCode:definitions.tcl"
  49. source "$HOME:Tcl:SystemCode:procs.tcl"
  50. source "$HOME:Tcl:SystemCode:flags.tcl"
  51. source "$HOME:Tcl:SystemCode:modes.tcl"
  52. source "$HOME:Tcl:SystemCode:copyRing.tcl"
  53.  
  54. # Bogus, but needs to be before userStartup read.
  55. set cwSig MMCC
  56. set cwdSig MWDB
  57.  
  58. set useEmacs 1
  59.  
  60. # Read both scalar and array definitions from preferences folder.
  61. if {!$skipPrefs} {
  62.     catch {readUserDefs}
  63. }
  64.  
  65. # After userprefs read.
  66. source "$HOME:Tcl:SystemCode:emacs.tcl"
  67.  
  68. # Set up color indices
  69. foreach ind [array names colorInds] {
  70.     eval setRGB $ind $colorInds($ind)
  71. }
  72.  
  73. foreach m $globalMenus_curr {
  74.     if {![catch $m]} {
  75.         insertMenu [set $m]
  76.     }
  77. }
  78.  
  79. updateSuffixes
  80. buildRecentFiles
  81.  
  82.  
  83. if {![info exists readReadme] || ($readReadme != [string trim [lindex [version] 2] {,}])} {
  84.     addDef readReadme [string trim [lindex [version] 2] {,}]
  85.     edit -r "$HOME:Help:Readme"
  86. } else {unset readReadme}
  87.  
  88.  
  89. if !$alphaLite {
  90.     source "$HOME:Tcl:SystemCode:paths.tcl"
  91.     source "$HOME:Tcl:SystemCode:smarterSource.tcl"
  92. }
  93.  
  94. setupPrintMenu
  95. rebuildMacroMenu
  96.  
  97. # "Switch To" submenu...
  98. buildSwitches
  99.  
  100. # Add to chars considered part of words.
  101. addAlphaChars {_ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÅØæøæß}
  102.  
  103.  
  104.  
  105. message "Initialization Complete"
  106.  
  107.  
  108.  
  109.